package cn.apestar.modules.sys.enums;

import java.util.HashMap;
import java.util.Map;
/**
 * Created by Singer_YDW on 2016/11/2.
 */
public enum UserIdentityEnum {
    /**
     * 普通
     */
    PT("1", "普通用户"),

    /**
     * 管理员
     */
    ZJ("2", "专家");

    private Object code;

    private String name;

    UserIdentityEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getValue() {

        // TODO Auto-generated method stub
        return code.toString();
    }

    public Long getLongValue() {

        // TODO Auto-generated method stub
        return (Long) code;
    }

    public String getName() {

        // TODO Auto-generated method stub
        return name;
    }

    /**
     * 返回该对象的MAP
     *
     * @return MAP集合
     */
    public Map getMap() {

        Map m = new HashMap();
        m.put("type_id", code);
        m.put("type_name", name);
        return m;
    }
}
